package de.gameduell.framework.gui.button {

	/**
	 * @author cbra
	 */
	public class ButtonGroupAlign {		
		private var lastButton:Button;
		private var offset:Number;
		
		public function ButtonGroupAlign(aOffset:Number) {
			lastButton = null;
			offset = aOffset;
		}
		
		public function addButton(aButton:Button):void{
			if(lastButton == null){
				lastButton = aButton;
			}else{
				aButton.x = lastButton.x + lastButton.state.width + offset;
				lastButton = aButton;
			}
		}
		
		
	}
}
